//
//  ViewController.m
//  27-homework-AVAudioPlay
//
//  Created by 王道林 on 16/8/20.
//  Copyright © 2016年 王道林. All rights reserved.
//

#import "ViewController.h"

#import "DLW_PlayMusic.h"
@interface ViewController ()

@property (nonatomic, strong) AVPlayer *player;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor yellowColor];
    [self createSubview];
    
}

- (void)createSubview
{
    
//    NSString *path = [[NSBundle mainBundle] pathForResource:@"李荣浩-李白" ofType:@".mp3"];
//    NSURL *url = [NSURL URLWithString:path];
//
//    NSURL *url = [NSURL URLWithString:@"http://www.9ku.com/play/464446.htm"];
//    AVPlayerItem *playItem = [[AVPlayerItem alloc] initWithURL:url];
//    
//    self.player = [[AVPlayer alloc] initWithPlayerItem:playItem];
//    
//    [_player play];
   
//    DLW_PlayMusic *playMusic = [DLW_PlayMusic sharePlayMusic];
//    
//    [playMusic setUrlStr:path];
//    [playMusic playSong];
  
//
    
}
- (IBAction)playButton:(id)sender {
    
    DLW_PlayMusic *playMusic = [DLW_PlayMusic sharePlayMusic];
    
    [playMusic setUrlStr:@""];
    [playMusic playSong];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
